{% extends 'forum/index.html' %}
{% block l_content %}
    <style>
        #ly {
        margin: 10px;
        }

        #ly-title {
            font-size: 1.5rem;
            margin-top: 10px;
        }
    </style>

    <div id="ly">
        <p id="ly-title">请在此说出你对公司的意见或建议^_^</p>
        <div style="margin-top: 1%;position: relative;width: 100%">
            <form class="form-horizontal" role="form" method="post" action="/forum/ly_submit/">
                {% csrf_token %}
                <div style="position: absolute;right: 13.5%;bottom:0;z-index: 1;">
                    <button type="submit" class="btn btn-default">提交</button>
                </div>
                <div class="form-group" style="width: 80%;margin-left: 1%">
                    <textarea class="form-control" required name="content" rows="3"></textarea>
                </div>
            </form>
        </div>
        <div class="ly-ly">
            <p>评论区：</p>
            {% if data %}
                {% for o in data %}
            <p style="margin-left: 5%;margin-bottom: 5px">
                <span style="color: #39b3d7">{{ o.name }}({{ o.depart }})</span>:
                <span>{{ o.content }}</span>
                <span class="zan margin_left">赞{{ o.praise }}</span><span class="pl-time margin_left">{{ o.time }}</span>
            </p>
                {% endfor %}
            {% else %}
                <p style="margin-left: 5%;margin-bottom: 5px">

                <span>暂时还没有人留言哦，赶紧说出你对本公司的建议吧！</span>

                </p>
            {% endif %}

        </div>
    </div>


    <script>
        $('.l_li').removeClass('active');
        $('#4').addClass('active');
    </script>
{% endblock %}